< previous page page_320 next page >

Page 320
· Groups: A collection of all the defined Group objects that have access to this Workspace.
· Users: A collection of all the defined User objects that have access to this Workspace.
Note.gif
You can only access the Group and User objects if the Microsoft Jet security is activated. You can only activate Microsoft Jet security through Microsoft Access. Although Visual Basic cannot initiate database security, you can manage the security features using Visual Basic 5.0. Security features are covered on Day 21, ''Securing Your Database Applications."

The Workspace Object Properties
Three Workspace object properties exist: the workspace name, the workspace user name, and the Isolate ODBC Trans property. The Isolate ODBC Trans property can be used to control the number of ODBC connections used during the database session.
Note.gif
ODBC connections are covered in depth in Week 3 of this book. For now, just remember that you can control the number of connections used by the session by altering the Isolate ODBC Trans property of the Workspace object.

When you begin a database operation, Visual Basic 5.0 creates a default workspace with the name #Default Workspace # and the user name admin. Let's add some code to the CH1001.VBP project to enumerate the default Workspace properties.
Add a new button to the form. Set its Name property to cmdWorkspaces and its Caption property to &Workspaces. Enter the code in Listing 9.6 into the cmdWorkspaces_Click code window.
Type.gifListing 9.6. Coding the cmdWorkspace_Click event.
Private Sub cmdWorkspaces_Click()
    '
    ' show workspaces
    '
    On Error GoTo LocalErr
    '

 
< previous page page_320 next page >

If you like this book, buy it!